export default [
    {
        path: '/',
        redirect: '/index'
    },
    {
        path: '/login',
        component: () => import('@/views/login')
    },
    {
        path: '/',
        component: () => import('@/components/common/Home.vue'),
        meta: {title: '系统首页'},

        children: [
            {
                path: 'index',
                name: 'index',
                meta: {title: '系统首页'},
                component: () => import('@/views/index')
            },
            {
                path: '/404',
                component: () => import('@/components/error/404.vue'),
                meta: {title: '404'}
            },
            {
                path: '/403',
                component: () => import('@/components/error/403.vue'),
                meta: {title: '403'}
            },
            {
                path: '/user',
                component: () => import('@/views/user'),
                meta: {title: '用户资料'},
                children: [
                    {
                        path: 'info',
                        component: () => import('@/views/user/info'),
                        meta: {title: '用户资料'}
                    }, {
                        path: 'list',
                        component: () => import('@/views/user/list'),
                        meta: {title: '用户列表'}
                    },
                ]
            },
            {
                path: '/task',
                component: () => import('@/views/scheduler'),
                meta: {title: '任务管理器'},
                redirect: '/scheduler/scheduler',
                children: [
                    {
                        path: 'scheduler',
                        component: () => import('@/views/scheduler/list'),
                        meta: {title: '任务列表'}
                    },
                    {
                        path: 'history',
                        component: () => import('@/views/scheduler/history'),
                        meta: {title: '任务历史'}
                    },
                    {
                        path: 'run_history',
                        component: () => import('@/views/scheduler/run_history'),
                        meta: {title: '任务运行历史'}
                    },

                ]
            },
            {
                path: '*',
                // redirect: '/404'
                component: () => import('@/components/error/404.vue'),
                meta: {title: '404'}
            }
        ]
    },
    {
        path: '*',
        redirect: '/404'
        // component: () => import('@/components/error/404.vue'),
        // meta: {title: '404'}
    }
]
